<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无限级别分类</title>
<link rel="stylesheet" type="text/css" href="../css/base.css" />
<script type="text/javascript" src="../js/NoLimitCategory.js?2"></script>
</head>
<body>


<br>
<table align="center" width="1000" border="1" style="border:1px solid #CCC">
  <tr height="30">
    <td width="50">分类：</td>
    <td id="cont_category">
    </td>
  </tr>
  <tr height="30">
    <td colspan="2" align="center"><input type="button" value="提交"/></td>
  </tr>
</table>
<script language="javascript">

var data = [
	{"id":1,"pid":0,"name":"古谱残局","children":[
		{"id":11,"pid":1,"name":"古典四大名局"},
		{"id":12,"pid":1,"name":"江湖八大排局","children":[
			{"id":13,"pid":12,"name":"野马操田"},
			{"id":14,"pid":12,"name":"小征东"},
			{"id":15,"pid":12,"name":"七星聚会"},
			{"id":16,"pid":12,"name":"炮炸两狼关"},
			{"id":17,"pid":12,"name":"火烧连营"},
			{"id":18,"pid":12,"name":"带子入朝"},
			{"id":19,"pid":12,"name":"大九连环"}
		]}
	]},
	{"id":2,"pid":0,"name":"古谱全局"},
		{"id":3,"pid":0,"name":"近代残局","children":[
		{"id":20,"pid":3,"name":"地方"},
		{"id":23,"pid":3,"name":"水电费"}
	]},
	{"id":4,"pid":0,"name":"现代棋书"},
];

var nlc = new NoLimitCategory(data, document.getElementById("cont_category"), '请选择');

nlc.onSelectCreate = function(selectObj){
	selectObj.style.cssText = 'margin-left:5px;height:24px;';
};

nlc.append();

	
</script>
</body>
</html>